﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CommissionReport.ascx.cs" Inherits="WebUserControl_CommissionReport" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() {
       $("#<%= bt_baocao.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
       $("#<%= bt_export.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="bt_export" />
</Triggers>
<ContentTemplate>
 <fieldset>
    <legend>Commission Report</legend>
    <div class="fm-req">
      <label for="DropDownList1">Chọn tháng:</label>
       <asp:DropDownList ID="DropDownList1" runat="server">
            </asp:DropDownList>
      </div>
      </fieldset>
      <div>
       <asp:Button ID="bt_baocao" runat="server" Text="Báo cáo" 
                onclick="bt_baocao_Click" />&nbsp;&nbsp;
            <asp:Button ID="bt_export" runat="server" onclick="bt_export_Click" 
                Text="Export to excel" />
      </div>
<br />
            <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server">
                <Fields>
                    <dxwpg:PivotGridField ID="field" Area="RowArea" AreaIndex="0" 
                        Caption="Trung tâm phân phối" FieldName="TrungtamPP">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field1" Area="DataArea" AreaIndex="0" 
                        Caption="Thưởng hỗ trợ trực tiếp 4%" FieldName="HHTT">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field2" Area="DataArea" AreaIndex="1" 
                        Caption="Thưởng hỗ trợ gián tiếp 3%" FieldName="HTGT">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field3" Area="DataArea" AreaIndex="2" 
                        Caption="Thưởng lãnh đạo 4%" FieldName="TLD">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field4" Area="DataArea" AreaIndex="3" 
                        Caption="Thưởng phát triển hệ thống 1%" FieldName="PTHT">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field5" Area="DataArea" AreaIndex="4" 
                        Caption="Lương quản lý theo doanh số" FieldName="LDS">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field6" Area="DataArea" AreaIndex="5" 
                        Caption="Thưởng quản lý hàng tháng theo cấp bậc" FieldName="TCB">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field7" Area="DataArea" AreaIndex="6" 
                        Caption="Thưởng danh hiệu một lần" FieldName="T1L">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field8" Area="DataArea" AreaIndex="7" 
                        Caption="Tiền thưởng ESM" FieldName="ESM">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field9" Area="DataArea" AreaIndex="8" 
                        Caption="Tiền thưởng EDM" FieldName="EDM">
                    </dxwpg:PivotGridField>
                    <dxwpg:PivotGridField ID="field10" Area="DataArea" AreaIndex="9" 
                        Caption="Tiền thưởng SDM" FieldName="SDM">
                    </dxwpg:PivotGridField>
                </Fields>
                <OptionsView ShowDataHeaders="False" />
            </dxwpg:ASPxPivotGrid>
       
<uc2:uscMsgBox ID="uscMsgBox1" runat="server" />



<dxpgw:ASPxPivotGridExporter ID="ASPxPivotGridExporter1" runat="server" 
    ASPxPivotGridID="ASPxPivotGrid1">
</dxpgw:ASPxPivotGridExporter>
</ContentTemplate>
</asp:UpdatePanel>



